// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Route.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   Route.cs
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Services.BingMaps.Resources.Routes
{
    using System.Collections.Generic;
    using Newtonsoft.Json;

    [JsonObject(MemberSerialization.OptIn)]
    internal sealed class Route
    {
        public Route()
        {
            BoundingBox = new List<double?>();
            RouteLegs = new List<RouteLeg>();
            RoutePath = new RoutePath();
        }

        [JsonProperty("__type")]
        public string Type { get; set; }

        [JsonProperty("bbox")]
        public IList<double?> BoundingBox { get; set; }

        [JsonProperty("id")]
        public string Id { get; set; }

        [JsonProperty("distanceUnit")]
        public string DistanceUnit { get; set; }

        [JsonProperty("durationUnit")]
        public string DurationUnit { get; set; }

        [JsonProperty("travelDistance")]
        public double? TravelDistance { get; set; }

        [JsonProperty("travelDuration")]
        public double? TravelDuration { get; set; }

        [JsonProperty("routeLegs")]
        public IList<RouteLeg> RouteLegs { get; set; }

        [JsonProperty("routePath")]
        public RoutePath RoutePath { get; set; }
    }
}